<?php
header("Content-type: text/html; charset=utf-8");
require("inc/common.inc.php");

$pagesize=intval($pagesize);
if ($pagesize==0){$pagesize=2;}

	if(empty($pageindex)){$pageindex=1;}
    $str=" and isok='1' and isdelete='0' ";
    $s="";

	$table=" mx_vpp_youhuiquan ";
	$order=" order by  createdate desc, id desc";
	$column=" * ";
	$biaoid="id";

	$c=$db->listcount($table,$str);

	$list=$db->list1($pageindex,$pagesize,$table,$column,$str,$order,$biaoid);

	if(!is_array($list) or $c==0 and $pageindex==1){
	  echo "|@#page#@|";
	  exit();
	}
	else{
	$nowhavenum=($pagesize*($pageindex-1))+count($list);
	if ($nowhavenum<$c){echo "1";}
	echo "|@#page#@|";
	for($i=0;$i<count($list);$i++){
	?>
		<li><a href="yhq_show.php?id=<?php echo $list[$i]["id"]?>&fromwxopenid=<?php echo $wxmxopenid;?>"><img src="<?php echo get_photourl($list[$i]["picurl"]);?>" /><h1><?php echo $list[$i]["name"]?></h1></a></li>
		<div class="clear"></div>
<?php
	}
	}
?>